package com.wanczy.service.impl;

import java.util.List;

import com.wanczy.dao.factory.RoleTableDAOFactory;
import com.wanczy.pojo.RoleTable;
import com.wanczy.service.RoleTableService;

public class RoleTableServiceImpl implements RoleTableService{

	@Override
	public List<RoleTable> find(String name,int pageSize,int pageCurrent) {
		return RoleTableDAOFactory.getRoleTableInstance().find(name, pageSize, pageCurrent);
	}

	@Override
	public boolean doUpd(RoleTable role) {
		return RoleTableDAOFactory.getRoleTableInstance().doUpd(role);
	}

	@Override
	public boolean doIns(RoleTable role) {
		return RoleTableDAOFactory.getRoleTableInstance().doIns(role);
	}

	@Override
	public boolean doDel(int roleId) {
		return RoleTableDAOFactory.getRoleTableInstance().doDel(roleId);
	}

	@Override
	public List<RoleTable> findByUserId(int userId) {
		return RoleTableDAOFactory.getRoleTableInstance().findByUserId(userId);
	}

	@Override
	public List<RoleTable> findByRoelId(int roleId) {
		return RoleTableDAOFactory.getRoleTableInstance().findByRoelId(roleId);
	}

	@Override
	public int findCount(String name) {
		return RoleTableDAOFactory.getRoleTableInstance().findCount(name);
	}

}
